﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoreLibrary.Utility
{
    public static class DynamicHelper
    {
        public static bool HasPropertyValue(dynamic item, string propertyName, object propertyValue)
        {
            var propertyInfo = item.GetType().GetProperty(propertyName);
            var value = propertyInfo.GetValue(item, null);

            return propertyValue.Equals(value);
        }
    }
}
